import http from "../utils/request"

//  分页
const friendPage = (data) => {
  return http.request({
    url: '/admin/friend/friendPage',
    method: 'get',
    data: data
  })
}

//  详情
const friendInfo = (id) => {
  return http.request({
    url: '/admin/friend/'+ id,
    method: 'get',
    data: {}
  })
}

//  修改
const updateFriend = (data) => {
  return http.request({
    url: '/admin/friend/update',
    method: 'post',
    data: data
  })
}

//  删除
const deleteFriend = (id) => {
  return http.request({
    url: '/admin/friend/delete/'+id,
    method: 'delete',
    data: {}
  })
}

//  修改审核状态
const changeFriendStatus = (id,status) => {
  return http.request({
    url: '/admin/friend/changeStatus/'+id + '/' + status,
    method: 'get',
    data: {}
  })
}

export {
  friendPage,
  friendInfo,
  updateFriend,
  deleteFriend,
  changeFriendStatus
}
